package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallPromoterDouyin;
import com.appkubes.mall.core.po.MallPromoterDouyinExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallPromoterDouyinMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter_douyin
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallPromoterDouyinSqlProvider.class, method="countByExample")
    long countByExample(MallPromoterDouyinExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter_douyin
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallPromoterDouyinSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallPromoterDouyinExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter_douyin
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_promoter_douyin",
        "where promoter_douyin_key = #{promoterDouyinKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String promoterDouyinKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter_douyin
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_promoter_douyin (promoter_douyin_key, app_key, ",
        "douyin_id, douyin_name, ",
        "count_good, count_fans, ",
        "create_time, update_time)",
        "values (#{promoterDouyinKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{douyinId,jdbcType=VARCHAR}, #{douyinName,jdbcType=VARCHAR}, ",
        "#{countGood,jdbcType=INTEGER}, #{countFans,jdbcType=INTEGER}, ",
        "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})"
    })
    int insert(MallPromoterDouyin record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter_douyin
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallPromoterDouyinSqlProvider.class, method="insertSelective")
    int insertSelective(MallPromoterDouyin record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter_douyin
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallPromoterDouyinSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="promoter_douyin_key", property="promoterDouyinKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="douyin_id", property="douyinId", jdbcType=JdbcType.VARCHAR),
        @Result(column="douyin_name", property="douyinName", jdbcType=JdbcType.VARCHAR),
        @Result(column="count_good", property="countGood", jdbcType=JdbcType.INTEGER),
        @Result(column="count_fans", property="countFans", jdbcType=JdbcType.INTEGER),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<MallPromoterDouyin> selectByExampleWithRowbounds(MallPromoterDouyinExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter_douyin
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallPromoterDouyinSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="promoter_douyin_key", property="promoterDouyinKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="douyin_id", property="douyinId", jdbcType=JdbcType.VARCHAR),
        @Result(column="douyin_name", property="douyinName", jdbcType=JdbcType.VARCHAR),
        @Result(column="count_good", property="countGood", jdbcType=JdbcType.INTEGER),
        @Result(column="count_fans", property="countFans", jdbcType=JdbcType.INTEGER),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<MallPromoterDouyin> selectByExample(MallPromoterDouyinExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter_douyin
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "promoter_douyin_key, app_key, douyin_id, douyin_name, count_good, count_fans, ",
        "create_time, update_time",
        "from mall_promoter_douyin",
        "where promoter_douyin_key = #{promoterDouyinKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="promoter_douyin_key", property="promoterDouyinKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="douyin_id", property="douyinId", jdbcType=JdbcType.VARCHAR),
        @Result(column="douyin_name", property="douyinName", jdbcType=JdbcType.VARCHAR),
        @Result(column="count_good", property="countGood", jdbcType=JdbcType.INTEGER),
        @Result(column="count_fans", property="countFans", jdbcType=JdbcType.INTEGER),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    MallPromoterDouyin selectByPrimaryKey(String promoterDouyinKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter_douyin
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallPromoterDouyinSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallPromoterDouyin record, @Param("example") MallPromoterDouyinExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter_douyin
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallPromoterDouyinSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallPromoterDouyin record, @Param("example") MallPromoterDouyinExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter_douyin
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallPromoterDouyinSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallPromoterDouyin record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter_douyin
     *
     * @mbg.generated
     */
    @Update({
        "update mall_promoter_douyin",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "douyin_id = #{douyinId,jdbcType=VARCHAR},",
          "douyin_name = #{douyinName,jdbcType=VARCHAR},",
          "count_good = #{countGood,jdbcType=INTEGER},",
          "count_fans = #{countFans,jdbcType=INTEGER},",
          "create_time = #{createTime,jdbcType=TIMESTAMP},",
          "update_time = #{updateTime,jdbcType=TIMESTAMP}",
        "where promoter_douyin_key = #{promoterDouyinKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallPromoterDouyin record);
}